﻿<UserControl x:Class="ForumsBrowser.CultureSelector"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fp="clr-namespace:ForumsBrowser"
    x:Name="cultureSelector"
    VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
    <UserControl.Resources>
        <fp:CultureList x:Key="cultureList"/>
    </UserControl.Resources>
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock Text="Preferred Culture:" VerticalAlignment="Center" Margin="5,0,0,0" Height="12.45" />
        <ListBox Grid.Row="1" Name="listBox1" SelectedValue="{Binding ElementName=cultureSelector, Path=SelectedCulture}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Black" SelectionChanged="listBox1_SelectionChanged" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" ItemsSource="{Binding Source={StaticResource cultureList} }" >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Path=DisplayName}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
